//
//  TaskWithFindGoodsByKey.m
//  DuBai
//
//  Created by lt on 14-4-3.
//  Copyright (c) 2014年 darktm. All rights reserved.
//

#import "TaskWithFindGoodsByKey.h"

@implementation TaskWithFindGoodsByKey

-(void)prepare{
    
    NSMutableString *url = [NSMutableString stringWithString:[Configure findGoodsByKey]];

    if(!self.key) return;
    
    [url appendFormat:@"%@?key=%@",url,self.key];
    
    if(self.start)
        [url appendFormat:@"start=%@",self.start];
    else
        [url appendFormat:@"start=%@",@"0"];
    
    if(self.sort)
        [url appendFormat:@"sort=%@",self.sort];
    else
        [url appendFormat:@"start=desc"];
    
    if(self.type)
        [url appendFormat:@"type=%@",self.type];
    else
        [url appendFormat:@"start=hots"];

    
    [self startAsyncWithParams:nil withMethod:@"GET" withURL:url];
}

@end
